import { Prop, SchemaFactory, Schema } from '@nestjs/mongoose';
import { Document } from 'mongoose';

@Schema({ timestamps: true })
export class Post extends Document {
  @Prop()
  title: string;
  @Prop()
  content: string;
  @Prop()
  author: string;
}

export const PostSchema = SchemaFactory.createForClass(Post);
